/**
 * 
 */
package org.statewalker.core;


/**
 * @author kotelnikov
 */
public class SyncState extends AsyncState {

    protected IEvent doActivate(IEvent event) throws Exception {
        return event;
    }

    @Override
    protected final void doActivate(IEvent event, ICallback callback)
        throws Exception {
        event = doActivate(event);
        callback.finish(event);
    }

    protected IEvent doDeactivate(IEvent event) throws Exception {
        return event;
    }

    @Override
    protected final void doDeactivate(IEvent event, ICallback callback)
        throws Exception {
        event = doDeactivate(event);
        callback.finish(event);
    }

}